A government may profess that educating children is a high priority, but if it slashes education funding, then clearly educating children is not a primary purpose of that government. If a cat catches a lizard, but then bats it around and plays with it, then its primary function was not to hunt the lizard for food. We figure out the purpose or function of a system from the way it behaves, not from our expectations or the purpose the system says it has.